25.12.18 react2shell security

마지막 수정일: 2025. 12. 18.

react RSC 보안 오류

TL;DR

react RSC에 deserialized할 때 해커가 들어올 수 있는 보안 오류가 생김
nextjs에서는 App router를 사용하면 해당되는데 블로그도 이에 해당
버전 업데이트(15.0.4 -> 15.0.7)와 fix-react2shell-next를 실행하여 보안 오류 해결

점검

nextjs에서 react2shell 문제를 확인, 해결할 수 있는 코드 publish
해당 링크: github 링크

SHELL
npx fix-react2shell-next
pnpm dlx fix-react2shell-next
bunx fix-react2shell-next

실행하면 다음과 같이 나타남 현재는 고쳐진 버전

SHELL
fix-react2shell-next - Next.js vulnerability scanner

Checking for 4 known vulnerabilities:

  - CVE-2025-66478 (critical): Remote code execution via crafted RSC payload
  - CVE-2025-55184 (high): DoS via malicious HTTP request causing server to hang and consume CPU
  - CVE-2025-55183 (medium): Compiled Server Action source code can be exposed via malicious request
  - CVE-2025-67779 (high): Incomplete fix for CVE-2025-55184 DoS via malicious RSC payload causing infinite loop

Found 1 package.json file(s)

No vulnerable packages found!
  Your project is not affected by any known vulnerabilities.